﻿using System;
using Microsoft.Practices.ServiceLocation;

namespace Caramel.ServiceBus
{
	public static class CommandHandlerExtensions
	{
		public static IServiceBus Bus<T>(this ICommandHandler<T> handler) where T : ICommand
		{
			return ServiceLocator.Current.GetInstance<IServiceBus>();
		}
	}
}
